//30.日期格式化
function dateFormat(replace, date) {
    var date = day == undefined ? new Date() : new Date(date);
    var year = date.getFullYear();
    var month = date.getMonth() + 1;
    var day = date.getDate();
    var hour = date.getHours();
    var minute = date.getMinutes();
    var second = date.getSeconds();
    return replace.replace("YY", year).replace("MM", month).replace("DD", day).replace("hh", hour).replace("mm", minute).replace("ss", second);
}

//34.当前元素的前一个元素
function prev(ele) {
    return ele.previousElementSibling || ele.previousSibling;
}

//35.当前元素的后一个元素
function next(ele) {
    return ele.nextElementSibling || ele.nextSibling;
}

//36.当前元素的父元素
function parent(ele) {
    return ele.parentElement;
}